package coreservlets;

import org.hibernate.Session;
import  coreservlets.HibernateUtil;
import coreservlets.client.Message;

public class main {

	public static void main(String[] args) {

		Message m = new Message();
		m.setId(1);
		m.setMessage("Hello world");
		Session ss = HibernateUtil.getSessionFactory().openSession();
		ss.beginTransaction();
		ss.save(m);
		ss.getTransaction().commit();
		ss.close();
	}

}
